import request from '@/utils/request';

export const reqfindRoomTypeAll = () => request({ url: '/roomType', method: 'get' });
export const reqfindUserAll = () => request({ url: '/sysUser/findUserAll', method: 'get' });
export const reqfindUserBy = (type, params) => request({ url: `/sysUser/find/user/${type}/${params}`, method: 'get' });
export const reqfindUserPage = (data) => request({ url: `/sysUser/findUserPage`, method: 'post', data });

// export const reqaddUser = (data) => request({url:"/sysUser/addUser",method:'put',data});

export const reqaddUser = (data) => {
    if(data.id){
        return request({url:"/sysUser/updateUser",method:'put',data});
    }else{
        return request({url: '/sysUser/addUser',method:'put',data});
    }
};

export const reqdeleteUser = (data)=> request({url:'/sysUser/deleteUser',method:'delete',data});

export const reqsysUserfindEmployeesPages = (data) => request ({url:'/sysUser/findEmployeesPages',method:'post',data});


export const reqfindstAll = () => request ({url:"/statistics/findall",method:'get'});
export const reqfindstAllTable = () => request ({url:"/statistics/findallTable",method:'get'});
export const findallType = () => request ({url:"/statistics/findallType",method:'get'});
